package com.example.zbh.lessona.duckdemo;

/**
 * Created by zbh on 15/11/18.
 */
public class LessonA {
    public static void main(String args[]) {
        Duck duck = new MallarDuck();
        duck.diplay();
        duck.setQuackBehavior();
        duck.setFlyBehavior();
        System.out.println();


        Duck duck1 = new RubberDuck();
        duck1.diplay();
        duck1.setFlyBehavior();
        duck1.setQuackBehavior();
        System.out.println();


        Duck duck2 = new RedHeadDuck();
        duck2.diplay();
        duck2.setFlyBehavior();
        duck2.setQuackBehavior();
        System.out.println();
        


        Duck duck3 = new DecoyDuck();
        duck3.diplay();
        duck3.setFlyBehavior();
        duck3.setQuackBehavior();
        System.out.println();



    }
}
